<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
		function isPrime(n){
			for(var i=2;i<=n-1;i++){
				if(n%i==0) return false;
			}
			return true;
		}
		function sunPrime(m){
			var sum=0;
			for(var i=2;i<=m;i++){
				if(isPrime(i)){
					console.log(i);
					sum+=i;
				}
			}
			return sum;
		}
		console.log(sunPrime(100));
		
		</script>
	</body>
</html>
